@ECHO OFF
@REM Setting Environment
@SET VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0\
@CALL "%VS_PATH%\VC\vcvarsall.bat" x86
@ECHO %date% %time% Start Building Solution
@REM Build Solution
devenv DCS.DownloadCenter.sln /build Release
@REM Copy Release
DEL /S/F/Q D:\WorkPublish\LDMDownloadService
XCOPY /E/X/Y/I .\FTPDownloadService\bin\Release .\Release\LDMDownloadService
DEL /S/F/Q D:\WorkPublish\PRLDownloadService
XCOPY /E/X/Y/I .\FTPDownloadService\bin\Release .\Release\PRLDownloadService
DEL /S/F/Q D:\WorkPublish\PFSDownloadService
XCOPY /E/X/Y/I .\FTPDownloadService\bin\Release .\Release\PFSDownloadService
DEL /S/F/Q D:\WorkPublish\LDMParseService
XCOPY /E/X/Y/I .\MessageParseService\bin\Release .\Release\LDMParseService
DEL /S/F/Q D:\WorkPublish\PRLParseService
XCOPY /E/X/Y/I .\MessageParseService\bin\Release .\Release\PRLParseService
DEL /S/F/Q D:\WorkPublish\PFSParseService
XCOPY /E/X/Y/I .\MessageParseService\bin\Release .\Release\PFSParseService
DEL /S/F/Q D:\WorkPublish\PRLSyncService
XCOPY /E/X/Y/I .\MessageSyncService\bin\Release .\Release\PRLSyncService
DEL /S/F/Q D:\WorkPublish\DCSMonitor
XCOPY /E/X/Y/I .\DCSMonitor\bin\Release .\Release\DCSMonitor
DEL /S/F/Q D:\WorkPublish\DCSDataService
XCOPY /E/X/Y/I .\DCSDataService\bin .\Release\DCSDataService
@REM Clean Release
forfiles.exe /P .\Release  /S /M *.pdb /C "CMD /C DEL /S @PATH"